package vn.vfriends.id.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.id.jpa.controller.GroupJpaController;
import vn.vfriends.id.jpa.entity.Group;
import vn.vfriends.id.jpa.entity.Group.GroupCode;
import vn.vfriends.id.service.GroupService;

/**
 *
 * @author tuan@vfriends.vn
 */
public class GroupServiceImpl implements GroupService {
    
    @Inject private GroupJpaController groupController;

    @Override
    public void create(Group group) throws Exception {
        groupController.create(group);
    }

    @Override
    public void edit(Group group) throws Exception {
        groupController.edit(group);
    }

    @Override
    public void destroy(Long id) throws Exception {
        groupController.destroy(id);
    }

    @Override
    public List<Group> find() {
        return groupController.find();
    }

    @Override
    public List<Group> find(int maxResults, int firstResult) {
        return groupController.find(maxResults, firstResult);
    }

    @Override
    public Group find(Long id) {
        return groupController.find(id);
    }

    @Override
    public Group findByName(String name) {
        return groupController.findByName(name);
    }

    @Override
    public Group findByCode(GroupCode code) {
        return groupController.findByCode(code);
    }

    @Override
    public int getCount() {
        return groupController.getCount();
    }

}
